<?php

namespace forfun\context;

use forfun\repository\entity\User;

class CoreContext
{
    /**
     * @var User 当前用户
     */
    private static $_user = null;

    /**
     * @param User $user
     * @return void
     */
    public static function setUser($user)
    {
        self::$_user = $user;
    }

    /**
     * @return User|null
     */
    public static function getUser()
    {
        return self::$_user;
    }
}